/*
* localStorage类似于cookie,在使用localStorage时要包裹try{}catch{},当用户在隐身或者无痕浏览时不会报错
* */
let defaultCity = '西安'
try {
  if (localStorage.city) {
    defaultCity = localStorage.city
  }
} catch (e) {}

const state = {
  city: defaultCity
}

export default state
